package org.example.interncandidate.controller.file;

import io.swagger.annotations.Api;
import org.example.interncandidate.common.model.BaseResponse;
import org.example.interncandidate.model.file.vo.FileVO;
import org.example.interncandidate.service.file.FileService;
import org.example.interncandidate.util.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@Api(tags = "文件控制层")
@RestController
@RequestMapping("/file")
public class FileController {
    @Autowired
    private FileService fileService;
    @RequestMapping("/upload")
    public BaseResponse<FileVO> upload(MultipartFile file){
        FileVO fileVo = fileService.uploadFile(file);
        return ResultUtil.success(fileVo);
    }
}
 